<!-- popup-detail 弹窗详情-->
<template>
  <div class="popup-detail">
    <div class="form-submit popup-detail-container">
      <h5 class="title">{{table_name[hType]}}</h5>
      <div class="popup-detail-content">
      <ul class="form-container" v-if="hType === '401101'">
        <li class="form-list">
          <second-input-box :content="t_subscribefee.DEPARTMENT_NAME" name="申请部门"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box  :content="t_subscribefee.APPLY_PERSON" name="申请人"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box :content="t_subscribefee.APPLY_DATE" name="申请日期" h-date="date" @changeInput="(time) => {t_subscribefee.APPLY_DATE = time}"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box  :content="t_subscribefee.APPLY_INFO" name="申请理由"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box  :content="t_subscribefee.COMMODITY_NAME" name="品名"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box  :content="t_subscribefee.COMMODITY_RULE" name="规格"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box h-kind="2" :content="t_subscribefee.BUDGET_PRICE" name="预计费用"></second-input-box>
        </li>
        <li class="form-list">
          <second-input-box :content="t_subscribefee.APPLY_OTHER" name="其它要求"></second-input-box>
        </li>
        <!-- <li class="form-list">
          <upload-file @imgArr="imgArr" :http-img-arr="ImageBase64Arr"></upload-file>
        </li> -->
      </ul>
    <ul class="form-container" v-else-if="hType === '401102'">
      <li class="form-list">
        <second-input-box :content="t_subscribefee.DEPARTMENT_NAME" name="来宾单位"></second-input-box>
      </li>
      <li class="form-list">
        <second-input-box :content="t_subscribefee.VISITOR_DATE" name="来宾时间" ></second-input-box>
      </li>
      <li class="form-list">
        <second-input-box :content="t_subscribefee.VISITOR_PERSONS" name="来宾人数"></second-input-box>
      </li>
      <li class="form-list">
        <second-input-box :content="t_subscribefee.APPLY_STAFF" name="经办人"></second-input-box>
      </li>
      <li class="form-list">
        <second-input-box :content="t_subscribefee.ACCOMPANY_PERSON" name="陪同人数"></second-input-box>
      </li>
      <li class="form-list">
        <second-input-box :content="t_subscribefee.HOTEL_INFO" name="拟定饭店及标准"></second-input-box>
      </li>
      <!-- <li class="form-list">
        <upload-file @imgArr="imgArr" :http-img-arr="ImageBase64Arr"></upload-file>
      </li> -->
    </ul></div>
    </div>
    <div class="btn-container"><span class="btn-content" @click="$emit('goBack')">返回</span></div>
  </div>
</template>

<script>
import uploadFile from '../assembly/uploadFile'
import secondInputBox from '../assembly/secondInputBox'
import { Indicator } from 'mint-ui'
import myClass from '@/assets/js/common'
export default {
  name: 'popupDetail',

  data () {
    return {
      table_name: {
        '401101': '行政资产申购',
        '401102': '公务接待'
      },
      ImageBase64:'', // 附件图片
      ImageBase64Arr: [], // base64图片
      t_subscribefee: {
        DEPARTMENT_NAME: '', // 申请部门
        APPLY_PERSON: '', // 申请人
        APPLY_DATE: '', // 申请日期
        APPLY_INFO: '', // 申请理由
        COMMODITY_NAME: '', // 品名
        COMMODITY_RULE: '', // 规格
        BUDGET_PRICE: '', // 预计费用
        APPLY_OTHER: '', // 其它要求
        SUBSCRIBEFEE_ID: '', // 内码
        FINANCEPROINST_ID: '', // 项目内码
        VISITOR_DATE: '', // 来宾时间
        VISITOR_PERSONS: '', // 来宾人数
        APPLY_STAFF: '', // 经办人
        ACCOMPANY_PERSON: '', // 陪同人员
        HOTEL_INFO: '', // 拟定饭店及标准
        STAFF_ID: '', // 操作人内码
        STAFF_NAME: '', // 操作人名称
        OPERATE_DATE: '', // 操作时间
        SUBSCRIBEFEE_DESC: '' // 备注
      }
    }
  },
  props: {
    'h-type': {
      default: 0
    },
    'h-fid': {
      default: ''
    }
  },
  components: {
    uploadFile,
    secondInputBox
  },

  computed: {},

  methods: {},
  created () {
      Indicator.open({
        text: '加载中……',
        spinnerType: 'fading-circle'
      })
    if (this.hFid !== '' && this.hFid > 0) {
      this.$api.post(this.$apiPath.baseURL, this.$apiPath.url, {
        action_type: 'GetSubscribefee',
        FINANCEPROINST_ID: this.hFid
      }).then(res => {
        Indicator.close()
        if (res && res.data && res.data.SubscribefeeList && res.data.SubscribefeeList.length > 0) {
          this.t_subscribefee = res.data.SubscribefeeList[0]
        }
      })
    }
  },
  mounted () {}
}
</script>
<style lang="stylus" scoped>
$rem = 2.5
.popup-detail
  position relative
  width 100%
  height 100%
  background-color #f4f4f4
  .popup-detail-container
    height 100%
  .popup-detail-content
    height calc(100% - 2rem)
  .btn-container
    position absolute
    bottom 0.2rem * $rem
    left 0
    width 100%
    text-align center
    .btn-content
      display inline-block
      width 90%
      height 0.8rem * $rem
      line-height 0.8rem * $rem
      background-color #4c4b59
      color #ffffff
      &:active
        opacity 0.8
</style>
